package com.cabinet.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cabinet.po.IctCommoditiesQuery;
import com.cabinet.service.IMCommoditiesService;
import com.cabinet.service.dao.CommoditiesDao;
import com.cabinet.service.dto.CommoditiesDto;
import com.cabinet.service.dto.CommoditiesPageUtil;
import com.cabinet.service.mybatis.IctCommoditiesMapper;
import com.cabinet.web.entity.Commodities;
@Service
public class McommoditiesService implements IMCommoditiesService{
	@Autowired
	private IctCommoditiesMapper ictCommoditiesMapper;
	
	@Autowired
	private CommoditiesDao commoditiesDao;

	@Override
	public List<IctCommoditiesQuery> queryCommoditiesByCidAndClaName(IctCommoditiesQuery ictCommoditiesQuery) {
		// TODO Auto-generated method stub
		return ictCommoditiesMapper.queryCommoditiesByCidAndClaName(ictCommoditiesQuery);
	}

	@Override
	public Commodities getCommoditiesDetail(Long coid) {
		// TODO Auto-generated method stub
		return commoditiesDao.findOne(coid);
	}

	@Override
	public List<CommoditiesDto> queryCommodities(CommoditiesPageUtil commoditiesPage) {
		// TODO Auto-generated method stub
		return ictCommoditiesMapper.queryCommodities(commoditiesPage);
	}

	@Override
	public int queryCommoditiesCount() {
		// TODO Auto-generated method stub
		return ictCommoditiesMapper.queryCommoditiesCount();
	}

	@Override
	public List<CommoditiesDto> queryCommoditiesBySellerId(CommoditiesPageUtil commoditiesPage) {
		// TODO Auto-generated method stub
		return ictCommoditiesMapper.queryCommoditiesBySellerId(commoditiesPage);
	}

	@Override
	public int queryCommoditiesCountBySellerId(CommoditiesPageUtil commoditiesPage) {
		// TODO Auto-generated method stub
		return ictCommoditiesMapper.queryCommoditiesCountBySellerId(commoditiesPage);
	}

}
